package com.example.foobar.business.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.foobar.entity.DaNewCommerCount;
import com.example.foobar.entity.DaUserChangeRecord;
import com.example.foobar.param.DaNewCommerCountPageParam;
import com.example.foobar.utils.DateRange;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.framework.core.pagination.Paging;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

/**
 * 新增用户数记录 服务类
 *
 * @author 郑英奔
 * @since 2021-05-31
 */
public interface DaNewCommerCountService {

    /**
     * 保存
     *
     * @param daNewCommerCount
     * @return
     * @throws Exception
     */
    boolean saveDaNewCommerCount(DaNewCommerCount daNewCommerCount) throws Exception;

    /**
     * 修改
     *
     * @param daNewCommerCount
     * @return
     * @throws Exception
     */
    boolean updateDaNewCommerCount(DaNewCommerCount daNewCommerCount) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteDaNewCommerCount(Long id) throws Exception;


    /**
     * 获取分页对象
     *
     * @param daNewCommerCountPageParam
     * @return
     * @throws Exception
     */
    Paging<DaNewCommerCount> getDaNewCommerCountPageList(DaNewCommerCountPageParam daNewCommerCountPageParam) throws Exception;

    void pullYestdayNewCommerCount(int unicaid, DateRange dateRange);

    DaNewCommerCount getById(Long id);

    int selectNewCommerCount(String uniacid, Date data) throws Exception;

    List<DaNewCommerCount> getDaNewCommerByUniacidAndDate(Integer uniacid, Date baseDate);

    boolean updateRemark(int uniacid, String remark);

    public boolean saveBatch(List<DaNewCommerCount> daNewCommerCounts);

    void remove(QueryWrapper<DaNewCommerCount> wrapper);

    void reloadNewCommerCountDate() throws ParseException;

}
